extends ICharacterComponent


class_name IUsableComponent
"""
可供角色使用的组件接口
"""


var __is_using: bool = false
var __mount_character: CharacterComponent = null


func get_character() -> CharacterComponent:
    return __mount_character

## 应用效果
func apply(character: CharacterComponent) -> bool:
    __mount_character = character
    __is_using = true
    return true

## 返回是否应用
func is_used() -> bool:
    return __is_using

## 取消效果
func cancel() -> void:
    __mount_character = null
    __is_using = false
